package system1

import (
	v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type WorkflowOwnerRouter struct {
}

// InitWorkflowOwnerRouter 初始化 当前审批处理人 路由信息
func (s *WorkflowOwnerRouter) InitWorkflowOwnerRouter(Router *gin.RouterGroup) {
	WorkflowOwnerRouter := Router.Group("WorkflowOwner").Use(middleware.OperationRecord())
	WorkflowOwnerRouterWithoutRecord := Router.Group("WorkflowOwner")
	var WorkflowOwnerApi = v1.ApiGroupApp.System1ApiGroup.WorkflowOwnerApi
	{
		WorkflowOwnerRouter.POST("createWorkflowOwner", WorkflowOwnerApi.CreateWorkflowOwner)             // 新建当前审批处理人
		WorkflowOwnerRouter.DELETE("deleteWorkflowOwner", WorkflowOwnerApi.DeleteWorkflowOwner)           // 删除当前审批处理人
		WorkflowOwnerRouter.DELETE("deleteWorkflowOwnerByIds", WorkflowOwnerApi.DeleteWorkflowOwnerByIds) // 批量删除当前审批处理人
		WorkflowOwnerRouter.PUT("updateWorkflowOwner", WorkflowOwnerApi.UpdateWorkflowOwner)              // 更新当前审批处理人
	}
	{
		WorkflowOwnerRouterWithoutRecord.GET("findWorkflowOwner", WorkflowOwnerApi.FindWorkflowOwner)       // 根据ID获取当前审批处理人
		WorkflowOwnerRouterWithoutRecord.GET("getWorkflowOwnerList", WorkflowOwnerApi.GetWorkflowOwnerList) // 获取当前审批处理人列表
	}
}
